<section class="content">
    <div class="row">
        <div class="col-md-12">
            <!-- general form elements -->
            <div class="box box-default">
                <div class="box-header with-border">
                    <h3 class="box-title">模版消息配置</h3>
                </div>
                <!-- form start -->
                <form class="form-horizontal layui-form" method="post" action="{:url('/admin/wx/tplmsg/add')}">
                    <div class="box-body">

                        <input class="form-control" name="id" placeholder="" value="{$tplmsg.id|default=0}"
                               type="hidden">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">模版类型</label>

                            <div class="col-sm-3">
                                <input class="form-control" name="name" placeholder="" disabled value="{$tplmsg.name|default=''}"
                                       type="text">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">模版编号</label>

                            <div class="col-sm-3">
                                <input class="form-control" name="template_id_short" placeholder="" disabled value="{$tplmsg.template_id_short|default=''}"
                                       type="text">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">模版标题</label>

                            <div class="col-sm-3">
                                <input class="form-control" name="title" placeholder="" value="{$tplmsg.title|default=''}"
                                       type="text">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">备注</label>

                            <div class="col-sm-6">
                                <textarea class="form-control" name="remark" placeholder="" rows="3">{$tplmsg.remark|default=''}</textarea>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="control-label col-md-2">状态</label>

                            <div class="col-md-7">
                                <input type="checkbox" name="status" lay-skin="switch" value="1"
                                {notempty name="tplmsg.status"}checked{/notempty}>
                            </div>
                        </div>
                    </div>
                    <!-- /.box-body -->

                    <div class="box-footer">
                        <div class="col-sm-2">
                            <button type="submit" class="btn btn-block btn-danger">保存</button>
                        </div>
                        <div class="col-sm-2">
                            <button type="button" class="btn btn-block btn-default" onclick="history.go(-1)">取消</button>
                        </div>
                    </div>
                </form>
            </div>
            <!-- /.box -->

        </div>
        <!--/.col (right) -->
    </div>
</section>
<script type="text/javascript">
    layui.use('form', function() {
        var form = layui.form();
        form.render(); //更新全部
    });
</script>
